package com.wiscamp.ninechapters.common.rest;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * 分页返回值包装类
 *
 * @author yifeng
 */
@Data
@EqualsAndHashCode
public class Meta implements Serializable {
    private static final long serialVersionUID = -4734371577573609753L;
    private int page;

    private int pages;

    private int perpage;

    private int total;

    private String sort;

    private String field;

    public Meta() {
    }

    public Meta(int page, int perpage, int pages, int total, String sort, String field) {
        this.page = page;
        this.perpage = perpage;
        this.pages = pages;
        this.total = total;
        this.sort = sort;
        this.field = field;
    }
}
